package com.googlecode.openauth.web.entity;

import java.util.UUID;

import org.apache.commons.lang.StringUtils;

public class ActionInfo {
	private int actionId;
	private String uuid;
	private String actionName;
	private String actionDesc;
	private int roleId;
	
	public int getRoleId() {
		return roleId;
	}

	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}

	public ActionInfo() {
		super();
		uuid = UUID.randomUUID().toString();
	}

	public int getActionId() {
		return actionId;
	}

	public void setActionId(int actionId) {
		this.actionId = actionId;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}

	public String getActionDesc() {
		return actionDesc;
	}

	public void setActionDesc(String actionDesc) {
		this.actionDesc = actionDesc;
	}
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append(" actionId : ");
		builder.append(actionId);
		
		if(!StringUtils.isEmpty(uuid)){
			builder.append(" uuid :  ");
			builder.append(uuid);
		}
		
		if(!StringUtils.isEmpty(actionName)){
			builder.append(" actionName : ");
			builder.append(actionName);
		}
		
		if(!StringUtils.isEmpty(actionDesc)){
			builder.append(" actionDesc : ");
			builder.append(actionDesc);
		}
		return builder.toString();
	}
}
